#include "stdafx.h"
#include "stack_test.h"

int stack_test::_random_toll = 0;

//---------------------------------------------------------------------------
void stack_test::test_init()
{
	_stack = std::make_unique<boost::lockfree::stack<int>>(_loops);
}
//---------------------------------------------------------------------------
void stack_test::do_test()
{
	_random_toll = _input_gen();

	_stack->push(_random_toll);
	
	if(_force_context_switch)
	{
		::SwitchToThread();
	}

	_stack->pop(_random_toll);
}
//---------------------------------------------------------------------------
std::string stack_test::test_name(void)
{
	return "boost-lockfree-stack";
}
//---------------------------------------------------------------------------
